package com.itheima.homeweek;

public class HomeWeek03 {//重写方法后比较两值是否相等
    public static void main(String[] args) {
        Person p1 =new Person("张三",30);
        Person p2 =new Person("张三",30);

        System.out.println(p1);
        System.out.println(p2);

        System.out.println(p1.equals(p2));
    }
}
